package com.tiny.work.plane;

import java.math.BigDecimal;

public abstract class AbstractModel implements IModel {

    /**
     * 耗油量 单位 t/t/km
     */
    BigDecimal oilPerKm;

    /**
     * 飞行速度 单位 h/km
     */
    BigDecimal hourPerKm;

    public AbstractModel() {
    }

    public AbstractModel(BigDecimal oilPerKm, BigDecimal hourPerKm) {
        this.oilPerKm = oilPerKm;
        this.hourPerKm = hourPerKm;
    }

    public BigDecimal getOilPerKm() {
        return oilPerKm;
    }

    public AbstractModel setOilPerKm(BigDecimal oilPerKm) {
        this.oilPerKm = oilPerKm;
        return this;
    }

    public BigDecimal getHourPerKm() {
        return hourPerKm;
    }

    public AbstractModel setHourPerKm(BigDecimal hourPerKm) {
        this.hourPerKm = hourPerKm;
        return this;
    }

    @Override
    public PlaneResult algorithm(BigDecimal journey, BigDecimal weight) {
        throw new RuntimeException();
    }

    @Override
    public boolean isMatch(Context oject) {
        throw new RuntimeException();
    }
}
